<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page import="com.surekam.mnai.util.SpringSecurityUtils"%>
<%@ page import="com.surekam.mnai.service.OperatorDetails"%>
<%@ page import="com.surekam.mnai.util.DateCl"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>手机号码归属信息管理系统</title>
<link rel="stylesheet" type="text/css" href="css/header.css"
	media="screen" />
<style>
* {
	margin: 0;
	padding: 0;
}

body {
	height: 100%;
	overflow: hidden;
}

#footer {
	clear: both;
	background: url(./images/footer.gif) repeat-x 0 0;
	/*background:url(./images/bg4.gif) repeat 0 0;*/
	height: 33px;
	line-height: 33px;
	text-align: center;
	color: #fff;
	height: 0px;
	font-family: "Arial";
}

#container {
	padding-left: 176px;
}

#container_left,#container_right,#left_menu,#left_bar {
	float: left;
}

#container_left {
	width: 176px;
	height: 100%;
	margin-left: -176px;
}

#left_menu {
	width: 171px;
	height: 100%;
}

#left_bar {
	background-color: #84BED1;
	vertical-align: middle;
	background-image: url("./images/bg5.gif") no-repeat;
	height: 100%;
	width: 5px;
}

#container_right {
	width: 100%;
	height: 100%;
}

.yj_crumbs {
	height: 33px;
	border-bottom: 1px solid #e0e1e0;
	line-height: 32px;
	color: #0192e0;
	margin-bottom: 2px;
}

.yj_crumbs a {
	display: inline-block;
	height: 32px;
	background: url(./images/crumbs1.gif) no-repeat right 0;
	padding: 0 20px 0 0;
}

.yj_crumbs a.yj_home {
	background: url(./images/crumbs.gif) no-repeat 0 0;
	width: 45px;
	padding: 0 5px 0 40px;
	color: #000;
}

.yj_crumbs a.yj_home:hover {
	color: #0192e0;
}
</style>
<script type="text/javascript">
	function bookmarksite(title, url) {
		if (document.all)
			window.external.AddFavorite(url, title);
		else if (window.sidebar)
			window.sidebar.addPanel(title, url, "")
	}
</script>
</head>

<body>
	<%
		OperatorDetails currentUser = SpringSecurityUtils.getCurrentUser();
	%>
	<div id="yj_header">
		<img src="./img/sysImg/bg.png" height="63px"></img>
		<div class="yj_topinfo">
			<a href="javascript:void(0)"
				onclick="this.style.behavior='url(#default#homepage)';this.setHomePage(location.href);">设为首页</a>
			| <a href="#" onclick="bookmarksite('河南移动保险查勘系统',location.href)">加入收藏</a>
			<span>你好，<%=currentUser.getName()%>！ <input id="currentUser"
				name="currentUser" type="hidden"
				value="<%=currentUser.getUsername()%>"></input> 本次登录时间：<%=DateCl.getDayTime(currentUser.getLoginTime())%>
				【<a href="./j_spring_security_logout">退出</a>】
			</span>
		</div>
		<div class="clearfix"></div>
	</div>
	<div id="container">
		<div id="container_left">
			<div id="left_menu">
				<iframe src="left.html" height="100%" width="100%" frameborder="0"></iframe>
			</div>
			<div id="left_bar" title="点击隐藏\展开左侧栏" style="cursor: pointer;">
			</div>
		</div>
		<div id="container_right">
			<div class="yj_crumbs">
				<a href="main.html" class="yj_home" target="main_iframe"
					onclick="javascript:$('#linkTitle').html('保险查勘定损系统');">首页</a> <span
					id="linkTitle"> 保险查勘定损系统 </span>
			</div>
			<iframe id="main_iframe" name="main_iframe" src="main.html"
				height="100%" width="100%" frameborder="0"></iframe>
		</div>
	</div>
	<!-- 
	    <div id="footer">
	        Copyright &copy; 2011China Mobile Communications Corp. All rights reserved. 河南移动保险查勘定损平台
	    </div>
	     -->
</body>
<script src="js/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
	/**
	 * 获取窗口高度  
	 */
	function getWinHeight() {
		var winHeight = 0;
		if (window.innerHeight) {
			winHeight = window.innerHeight;
		} else if ((document.body) && (document.body.clientHeight)) {
			winHeight = document.body.clientHeight;
		}
		// 通过深入Document内部对body进行检测，获取窗口大小  

		if (document.documentElement && document.documentElement.clientHeight
				&& document.documentElement.clientWidth) {
			winHeight = document.documentElement.clientHeight;
		}
		return winHeight;

	}
	/*
	 *重新调整高度
	 */
	function resizeContainer() {
		var height = getWinHeight();
		var headerHeight = $("#yj_header").height();
		var footerHeight = 0;//$("#footer").height();
		var containerHeight = height - headerHeight - footerHeight;
		$("#container").height(containerHeight);
		$("#main_iframe").height(containerHeight - $(".yj_crumbs").height());
	}

	/**
	 * 当窗口大小改变时，调整主工作区或的高度
	 */
	$(function() {
		resizeContainer();
		$(window).resize(function() {
			resizeContainer();
		});
	})

	/**
	 * 缩起、展开左导航
	 */
	$(function() {
		$("#left_bar").toggle(
				function() {
					$("#left_menu").hide();
					$("#container").css("padding-left", "20px");
					$("#container_left").css("width", "20px").css(
							"margin-left", "-20px");
					$("#left_bar").css("width", "20px");
				},
				function() {
					$("#left_menu").show(100);
					$("#container").css("padding-left", "176px");
					$("#container_left").css("width", "176px").css(
							"margin-left", "-176px");
					$("#left_bar").css("width", "5px");
				})

		//BT做法，为了确保样式的统一，待找到解决方案后替换掉
		//$("#left_bar").click().click();
	})
</script>
</html>
